package com.blockchain.securewallet.activities;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.blockchain.securewallet.R;
import com.blockchain.securewallet.base.BaseActivity;
import com.blockchain.securewallet.interfaces.WalletFields;
import com.blockchain.securewallet.tools.ActivityLauncher;
import com.blockchain.securewallet.utils.StringUtil;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * FAQ界面
 */
public class FAQActivity extends BaseActivity {


    @BindView(R.id.tv_title)
    TextView tvTitle;

    private int type;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_faq);
        ButterKnife.bind(this);

        tvTitle.setText(StringUtil.getResourceString(R.string.tips_help_title));
    }


    @OnClick({R.id.btn_back, R.id.tv_wallet_create, R.id.tv_wallet_restore, R.id.tv_account_switch, R.id.tv_balance_receive, R.id.tv_balance_send, R.id.tv_balance_update, R.id.tv_set_fee, R.id.tv_address_all, R.id.tv_password_seed, R.id.tv_password_pay, R.id.tv_password_gesture})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_back:
                finish();
                break;
            case R.id.tv_wallet_create:
                type = WalletFields.FAQ.WALLET_CREATE;
                break;
            case R.id.tv_wallet_restore:
                type = WalletFields.FAQ.WALLET_RESTORE;
                break;
            case R.id.tv_account_switch:
                type = WalletFields.FAQ.WALLET_SWITCH;
                break;
            case R.id.tv_balance_receive:
                type = WalletFields.FAQ.BALANCE_RECEIVE;
                break;
            case R.id.tv_balance_send:
                type = WalletFields.FAQ.BALANCE_SEND;
                break;
            case R.id.tv_balance_update:
                type = WalletFields.FAQ.BALANCE_UPDATE;
                break;
            case R.id.tv_set_fee:
                type = WalletFields.FAQ.FEE_SET;
                break;
            case R.id.tv_address_all:
                type = WalletFields.FAQ.ADDRESS_ALL;
                break;
            case R.id.tv_password_seed:
                type = WalletFields.FAQ.PASSWORD_SEED;
                break;
            case R.id.tv_password_pay:
                type = WalletFields.FAQ.PASSWORD_PAY;
                break;
            case R.id.tv_password_gesture:
                type = WalletFields.FAQ.PASSWORD_GESTURE;
                break;
            default:
                //默认的类型
                type = WalletFields.FAQ.DEFAULT;
                break;
        }
        ActivityLauncher.gotoFAQDetailsActivity(this, type);
    }


}
